function setZeroes(matrix: number[][]): void {
  const m = matrix.length
  const n = matrix[0].length
  const targets = []
  for (let i = 0; i < m; i++) {
      for (let j = 0; j < n; j++) {
          if (matrix[i][j] === 0) {
              targets.push([i, j])
          }
      }
  }
  targets.forEach(item => {
      let [i, j] = item
      matrix[i] = Array(n).fill(0)
      for (let ind = 0; ind < m; ind++) {
          matrix[ind][j] = 0
      }
  })
}